#pragma once

void calib3d_atamul (cplxf *z, cplxf *calib, int *csize, cplxf *x, int *xsize);
void calib3d_cheev (complex *&V, int& nv, complex *calib, int *csize, int *ksize, float tau);
void calib3d_lanczos (cplxf *&V, int& nv, cplxf *calib, int *csize, int *ksize, int k, float tau);

void calib3d_matrix_size (int& m, int& n, int *csize, int *ksize);
void calib3d_matrix (cplxf *A, cplxf *calib, int *csize, int *ksize);


void calib3d_posv (cplxf *&k3d, int *ksz, cplxf *calib, int *czs, float tychonov);
void calib3d_chol (cplxf *&k3d, int *ksz, cplxf *calib, int *csize, float tychonov);

//void kreduce3d (cplxf *KKt, cplxf *K, int ks1, int ks2, int ks3, int n, int m);
void kreduce3d (cplxf *KKt, cplxf *K, int *ksize,int n, int m);
void cukreduce3d (cplxf *KKt, cplxf *K, int *ksize,int n, int m);

void calib3d_orthiter (complex *smap, float *emap, complex *KKt, int *xsize, int *ksize, int qcols, int qriters);
void calib2d_orthiter (complex *vmap, float *emap, int *imsize, complex *Km, int qcols, int qriters);
void calib2d_cuorthiter (cplxf *vmap, float *emap, int *imsize, cplxf *Km, int qcols, int qriters, int batch = 1);

void calib3d_cuatamul (cplxf *z, cplxf *calib, int *csize, cplxf *x, int *xsize);
void calib3d_culanczos (cplxf *&V, int& nv, cplxf *calib, int *csize, int *ksize, int k, float tau);
